<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>小海智途</title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <meta content="" name="keywords">
    <meta content="" name="description">

    <!-- Favicon -->
    <link href="img/logo.png" rel="icon">

    <!-- Google Web Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Heebo:wght@400;500;600;700&display=swap" rel="stylesheet">
    
    <!-- Icon Font Stylesheet -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.1/font/bootstrap-icons.css" rel="stylesheet">

    <!-- Libraries Stylesheet -->
    <link href="lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
    <link href="lib/tempusdominus/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet" />

    <!-- Customized Bootstrap Stylesheet -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- Template Stylesheet -->
    <link href="css/style.css" rel="stylesheet">
</head>

<body>
    <div class="container-fluid position-relative bg-white d-flex p-0">
        <!-- Spinner Start -->
        <div id="spinner" class="show bg-white position-fixed translate-middle w-100 vh-100 top-50 start-50 d-flex align-items-center justify-content-center">
            <div class="spinner-border text-primary" style="width: 3rem; height: 3rem;" role="status">
                <span class="sr-only">Loading...</span>
            </div>
        </div>
        <!-- Spinner End -->


        <!-- Sidebar Start -->
        <div th:replace="~{common :: #sidebar}"></div>
        <!-- Sidebar End -->


        <!-- Content Start -->
        <div class="content">
            <!-- Navbar Start -->
            <div th:replace="~{common :: #navbar}"></div>
            <!-- Navbar End -->


            <!-- Table Start -->
            <div class="container-fluid pt-4 px-4">
                <div class="row">  
                    <div class="">
                        <div class="bg-light rounded h-100 p-4">                       
                            <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th scope="col">坐标</th>
                                        <th scope="col">类型</th>
                                        <th scope="col">地点</th>
                                        <th scope="col">年</th>
                                        <th scope="col">月</th>
                                        <th scope="col">日</th>
                                        <th scope="col">添加</th>
                                        <th scope="col">详细信息</th>
                                        
                                        
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr th:each="list: ${baselist}">
                                            <th scope="row">[[${list.id}]]</th>
                                            <td>[[${list.kind}]]</td>
                                            <td>[[${list.place}]]</td>
                                            <td>[[${list.year}]]</td>
                                            <td>[[${list.month}]]</td>
                                            <td>[[${list.day}]]</td>
                                            <td><a class="" onclick="myFunction(this.id)" href="javascript:;" th:id="add+${list.id}">增加坐标</a></td>
                                            <td><a class="link-danger" th:href="@{'/_table'+${list.id}}">详细信息</a></td>
                                        </tr>
                                </tbody>
                            </table>
                            
                        </div>
                    </div>
                </div>
            </div>
            <!-- Table End -->
			
            <!-- Footer Start -->
            <div th:replace="~{common :: #footer}"></div>
            <!-- Footer End -->
        </div>
        <!-- Content End -->
		<!-- 展示 Start -->
			<div class="position-fixed" style="width: 100%;top:90%">
				<div class="container-fluid  pt-4 px-4">
				<div class="row">
					<div class="col-2 offset-10">
                    		<div class="input-group col-2">
                    			<button type="button" class="btn btn-warning"><a th:href="@{/map}" class="text-dark">展示路线</a></button>
							    <input type="text" class="form-control" disabled id="addsum" value="0">
  							</div>
                    </div>
				</div>
				</div>
			</div>
             <!-- 展示 End -->

        
    </div>

    <!-- JavaScript Libraries -->
    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"></script>
    <script src="lib/chart/chart.min.js"></script>
    <script src="lib/easing/easing.min.js"></script>
    <script src="lib/waypoints/waypoints.min.js"></script>
    <script src="lib/owlcarousel/owl.carousel.min.js"></script>
    <script src="lib/tempusdominus/js/moment.min.js"></script>
    <script src="lib/tempusdominus/js/moment-timezone.min.js"></script>
    <script src="lib/tempusdominus/js/tempusdominus-bootstrap-4.min.js"></script>

    <!-- Template Javascript -->
    <script src="js/main.js"></script>
    
</body>
<script type="text/javascript">
			function getfrom(){
					var form = document.getElementById("deleteBlog");
					form.action = event.target.href;
					form.submit();
					event.preventDefault();
					            }
			function Findfrom(){
				var form = document.getElementById("FindBlog");
				form.action = event.target.href;
				form.submit();
				event.preventDefault();
				            }
			function myFunction(id) {
				var addsum = document.getElementById("addsum");
				var sum = parseInt(addsum.value)+1;
				addsum.value = sum;
				var a = document.getElementById(id);
				a.setAttribute('style','pointer-events:none');
				a.setAttribute('class','link-success');

				}
</script>

</html>